#!/bin/sh
#
# 简单写一下脚本的功能。
#
#
#

if [ $# -ne 0 ]; then
	echo "Usage: $0 words"
	exit
fi

localdir="/Users/hbaolong/workshop/gitee/3place/"

dirs="0600论语 0402八卦"

for files in `echo $dirs`
do
	echo $localdir$files
	cd $localdir$files
	source config
	tarbook
	mv $bookname"_"$tag.md /tmp/words.$bookname
done

cd /tmp/

mdfile=word.md

cat words.* >$mdfile

rm -f /tmp/words.*

grep "^+ " $mdfile| awk -F， '{print $1}'|sort -g |uniq -c |sort -g | awk -F \+ '{print $2}'|sed -e "s/^ //g"|sed -e "s/^ //g"| sed -e "/ /d"|sort -g |uniq -c |awk '{print $2}'>$mdfile.1


